package com.baidunewmusic;

import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;

import org.apache.http.util.ByteArrayBuffer;

import com.baidunewmusic.Playlist.Song;

import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.util.Log;
import android.widget.MediaController;
import android.widget.TextView;

public class AudioPlayerActivity extends Activity {
	/**
	 * @see android.app.Activity#onCreate(Bundle)
	 */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.play);
		Song song = getIntent().getParcelableExtra("SONG");
		
		final MediaPlayer mp = new MediaPlayer();
		MediaController mc = new MediaController(getBaseContext());
	//	mc.setMediaPlayer(mp);
		String lyrics = Playlist.getPageSource(song.lyrics);
		lyrics = lyrics.replace("\r\n", "\n");
		((TextView)findViewById(R.id.lyrics)).setText(lyrics);
		Log.d(getClass().getSimpleName(), song.title);
	}

	/**
	 * @see android.app.Activity#onStart()
	 */
	@Override
	protected void onStart() {
		super.onStart();
		// TODO Put your code here
	}
	
}
